<template>
    <div class="login">
        <div class="login-left">
            <div class="loginLeft">
                <div class="login-left-icon">
                    <div  class="login_logo" @click="$navTo('/home/index')">
                        <img  src="./../../assets/logo.png" alt="">
                    </div>
                </div>
                <div class="login-left-cont">
                    <div  class="login-left-body">
                        <div  class="hej">Hej!</div> 
                        <div  class="txt">为大众创造更美好的日常生活</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="login-right">
            <div class="login-right-content">
                <div class="LoginRightInner">
                    <div v-if="type==1">
                        <div   class="phoneLog">
                            <h2   class="title">欢迎来到天威</h2> 

                        </div>
                        <el-form ref="form" :model="form" >
                            <el-form-item label="">
                                <el-input v-model="form.name" placeholder="手机号"></el-input>
                            </el-form-item>
                            <el-form-item label="" class="code">
                                <el-input v-model="form.name" placeholder="验证码"></el-input>
                                <button class="code-btn">获取验证码</button>
                            </el-form-item>
                            <el-form-item label="" class="check">
                                    <el-checkbox class="check">
                                        我已阅读天威<a href="javascript:;" class="link">隐私政策</a>
                                    </el-checkbox>
                            </el-form-item>
                            <el-form-item label="">
                                <el-button type="primary" class="btn">登陆/注册</el-button>
                            </el-form-item>
                        </el-form>
                    </div>
                    <div v-if="type ==2">
                        <div   class="phoneLog">
                            <h2   class="title">欢迎来到天威</h2> 
                             <p style="text-align:center;">请通过微信扫描以下二维码进行登录</p>
                        </div>
                        <div class="wrp_code">
                            <img src="" alt="">
                        </div>
                    </div>
                     <div v-if="type==3">
                        <div  class="right-head">
                            <div class="head-cont">
                                <h2>账号密码登陆</h2>
                                 <p >您可以使用注册的账号与设置过的密码进行登录</p>
                            </div>
                           <div class="head-icon"><img  src="https://static.web.ikea.cn/static/images/pc/memberClub/account_pwd_login.svg" alt=""></div>
                        </div>
                        <el-form ref="form" :model="form" >
                            <el-form-item label="">
                                <el-input v-model="form.name" placeholder="手机号/邮箱"></el-input>
                            </el-form-item>
                            <el-form-item label="" >
                                <el-input v-model="form.name" placeholder="密码"></el-input>
                             
                            </el-form-item>
                            <el-form-item label="" class="check">
                                   <a href="javascript:;" class="link_foget">忘记密码？</a>
                            </el-form-item>
                            <el-form-item label="">
                                <el-button type="primary" class="btn">登陆</el-button>
                            </el-form-item>
                        </el-form>
                    </div>
                    <div class="other-login">
                        <div class="tit">其他方式登陆</div>
                        <div class="flex">
                            <div class="other-methods_item" v-if="type !=2" @click="type =2">
                                <div class="icon-box">
                                    <img src="https://static.web.ikea.cn/static/images/user/icon_Wechat_Highlight.svg" alt="">
                                </div>
                                <div class="txt-box">微信登陆</div>
                            </div>
                            <div class="other-methods_item" v-if="type !=3"  @click="type =3">
                                <div class="icon-box">
                                    <img src="https://static.web.ikea.cn/static/images/user/icon_user.svg" alt="">
                                </div>
                                <div class="txt-box">账号密码登陆</div>
                            </div>
                            <div class="other-methods_item" v-if="type !=1"  @click="type =1">
                                <div class="icon-box">
                                    <img src="https://static.web.ikea.cn/static/images/user/icon_phone.svg" alt="">
                                </div>
                                <div class="txt-box">短信验证码登陆</div>
                            </div>
                        </div>
                    </div>
                </div>
               
            </div>
        </div>
    </div>
</template>
<script>
export default{
    data(){
        return{
            form:{},
            type:1, //1短信验证码登陆 2.微信。3账号和密码
        }
    }
}
</script>
<style lang="scss">
.login{
    max-width: none;
    min-height: 100vh;
    padding-top: 0;
    width: 100%;
    height: auto;
    padding-left: 0;
    padding-right: 0;
    display: flex;
    box-sizing: content-box;
    .link{
                color: #409eff;
            }
    .check {
        font-size: 12px;
        .el-checkbox__label{
            font-size: 12px !important;
            color: #999 !important;
            font-weight: 400 !important;
            
        }
    }
    .login-left{
        width: 40%;
        .loginLeft{
            position: relative;
            width: 100%;
            background: #0058a3;
            height: 100%;
            display: flex;
            flex-direction: column;
            .login-left-icon{
                padding: 24px;
                display: flex;
                align-items: center;
                .login_logo{
                    cursor: pointer;
                }
            }
            .login-left-cont{
                display: flex;
                justify-content: center;
                align-items: center;
                flex: 1;
                margin: -200px 23.6% 0;
                .hej{
                    font-size: 50px;
                    line-height: 60px;
                    color: #ffdb00;
                    font-weight: 700;
                    margin-bottom: 32px;
                }
                .txt{
                    font-weight: 700;
                    font-size: 36px;
                    line-height: 54px;
                    color: #fff;
                }
            }
        }
    }
    .login-right{
        width: 62%;
        height: 100%;
        overflow: hidden;
        .login-right-content{
            height: 100%;
            width: 100%;
            padding: 15% 10% 10% 17%;
            .LoginRightInner{
                max-width: 500px;
                .title{
                    font-size: 30px;
                    line-height: 45px;
                    color: #111;
                    margin-bottom: 30px;
                    color: #0058a3;
                    text-align: center;
                }
                .el-form-item{
                    margin-bottom: 40px;
                    .el-input__inner{
                        border: none;
                        border-bottom: 1px solid #DCDFE6;
                        border-radius: 0;
                    }
                    .el-input__inner{
                        padding-left: 0;
                    }
                }
                .code{
                    .el-form-item__content{
                        display: flex;
                    }
                    .el-input{
                        flex: 1;
                    }
                    .code-btn{
                        width: 140px;
                        right: 0;
                        height: 40px;
                        line-height: 40px;
                        border:1px solid #DCDFE6;
                        margin-left: 4px;
                        border-radius: 20px;
                        cursor: pointer;
                        font-size: 12px;
                        color: #999;
                    }
                }
                .btn{
                    width: 100%;
                    border-radius: 40px;
                }
                .other-login{
                    .tit{
                        font-size: 16px;
                        line-height: 24px;
                        color: #484848;
                        margin-bottom: 20px;
                    }
                    .flex{
                        .other-methods_item{
                            display: inline-block;
                            margin-right: 30px;
                            text-align: center;
                            cursor: pointer;
                        }
                        .icon-box{
                            width: 50px;
                            height: 50px;
                            border: 1px solid #959595;
                            border-radius: 50px;
                            text-align: center;
                            margin: 0 auto;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                        }
                        .txt-box{
                            font-size: 12px;
                            line-height: 20px;
                            color: #111;
                            margin-top: 12px;
                            white-space: nowrap;
                        }
                    }
                }
            }
            .link_foget{
                color: #999;
                font-size: 12px;
                text-decoration: underline;
            }
            .wrp_code{
                padding: 30px 0;
                text-align: center;
            }
            .right-head{
                margin-bottom: 30px;
                display: flex;
                justify-content: center;
                width: 100%;
                align-items: center;
                .head-cont{
                    margin-right: 30px;
                    flex: 1;
                    h2{
                        font-size: 30px;
                        line-height: 50px;
                        margin: 0;
                        margin-bottom: 14px;
                    }
                    p{
                        font-size: 18px;
                        line-height: 28px;
                        color: #484848;
                    }
                }
            }
        }
    }
}
</style>